package skipass.command;

import skipass.container.CountCard;


public class CheckCount implements Command {

	private CountCard card;

	public CheckCount(CountCard card) {
		this.card = card;
	}
	
	@Override
	public boolean execute() {
		int count = card.getCount();
		if(count > 0) {				
			card.setCount(count-1);
			return true;
		}		
		else return false;	
	}
	
}